package net.jgrm.common.constant;

import java.math.BigDecimal;

/**
 * 公共常量定义
 *
 * @author service-common
 * @date 2024-09-12
 */
public class CommonConstant {

    // ==================== 私有构造函数 ====================

    private CommonConstant() {
        // 常量类不允许实例化
    }

    // ==================== 排序字段 ====================

    /**
     * 创建时间排序字段
     */
    public static final String CREATETIME_ORDER_FIELD = "createTime";

    /**
     * 价格排序字段
     */
    public static final String PRICE_ORDER_FIELD = "price";

    // ==================== 环境配置 ====================

    /**
     * 生产环境
     */
    public static final String PRO_ENV = "pro";

    /**
     * 测试环境
     */
    public static final String DEV_ENV = "dev";

    // ==================== 系统配置 ====================

    /**
     * 向ES同步订单最大重试次数
     */
    public static final int MAX_RETRY_TIMES = 5;

    /**
     * Map初始化默认大小
     */
    public static final int DEFAULT_MAP_SIZE = 8;

    /**
     * Map初始化最大大小
     */
    public static final int MAX_MAP_SIZE = 16;

    // ==================== 客户端渠道 ====================

    /**
     * APP渠道
     */
    public static final String APP_CLIENT = "APP";

    /**
     * 微信小程序渠道
     */
    public static final String XCX_CLIENT = "XCX";

    /**
     * 微信公众号渠道
     */
    public static final String WEIXIN_CLIENT = "WEIXIN";

    /**
     * 银联小程序渠道
     */
    public static final String UNIONPAY_XCX_CLIENT = "UNIONPAY_XCX";

    // ==================== 显示模式 ====================

    /**
     * 售价展示
     */
    public static final int SHOW_BY_PRICE = 1;

    /**
     * 折扣价展示
     */
    public static final int SHOW_BY_DISCOUNT = 2;

    // ==================== 通用字段 ====================

    /**
     * 获取手机验证码字段
     */
    public static final String SMS_CODE_VALUE_PARAM = "value";

    /**
     * 有效状态
     */
    public static final int VALID = 1;

    /**
     * 无效状态
     */
    public static final int INVALID = 0;

    // ==================== 支付相关 ====================

    /**
     * 支付宝退款超期时间 90天
     */
    public static final long ALIPAY_REFUND_OVERDUE_MILLISECOND = 90 * 24 * 60 * 60 * 1000L;

    /**
     * 微信退款超期时间 180天
     */
    public static final long WX_REFUND_OVERDUE_MILLISECOND = 180 * 24 * 60 * 60 * 1000L;

    /**
     * 一百
     */
    public static final BigDecimal ONE_HUNDRED = new BigDecimal("100");

    // ==================== 处理渠道 ====================

    /**
     * 售后处理 - 平台处理
     */
    public static final String PLATFORM_PROCESS_CHANNEL = "platform";

    /**
     * 售后处理 - 商家处理
     */
    public static final String BUSINESS_PROCESS_CHANNEL = "business";

    /**
     * 售后处理 - 用户申请
     */
    public static final String USER_APPLY_PROCESS_CHANNEL = "user";

    // ==================== 银行相关 ====================

    /**
     * 中信银行银企直联系统没有登录的状态码
     */
    public static final String ZHONGXIN_BANK_SERVER_NOT_LOGIN_ERROR_CODE = "ED12002";

    /**
     * 处理提现后返回的成功状态
     */
    public static final String PROCESS_WITHDRAW_RESULT_STATUS = "AAAAAA";

    // ==================== 业务类别 ====================

    /**
     * 洗车业务类别
     */
    public static final int WASH_CAR_CATEGORY_TYPE = 0;

    /**
     * 钱包服务 - 洗车业务类别
     */
    public static final String WALLET_WASH_CAR_CATEGORY_TYPE = "car";

    /**
     * 保养业务类别
     */
    public static final int MAINTENANCE_CAR_CATEGORY_TYPE = 1;

    /**
     * 钱包服务 - 保养业务类别
     */
    public static final String WALLET_MAINTENANCE_CAR_CATEGORY_TYPE = "car-maintenance";

    /**
     * 审车业务类别
     */
    public static final int INSPECTION_CAR_CATEGORY_TYPE = 2;

    /**
     * 钱包服务 - 审车业务类别
     */
    public static final String WALLET_INSPECTION_CAR_CATEGORY_TYPE = "car_inspection";

    /**
     * 商城业务类别
     */
    public static final int GROUPBUY_CATEGORY_TYPE = 3;

    /**
     * 钱包服务 - 商城业务类别
     */
    public static final String WALLET_GROUPBUY_CATEGORY_TYPE = "group-buy";

    /**
     * 开通会员业务类别
     */
    public static final int OPEN_MEMBER_CATEGORY_TYPE = 4;

    /**
     * 钱包服务 - 开通会员业务类别
     */
    public static final String WALLET_OPEN_MEMBER_CATEGORY_TYPE = "memberNew";

    // ==================== 会员类型 ====================

    /**
     * 商城会员类型
     */
    public static final String MALL_MEMBER_TYPE = "mall";

    /**
     * 车主会员类型
     */
    public static final String CAR_MEMBER_TYPE = "car";

    /**
     * 全部会员类型
     */
    public static final String ALL_MEMBER_TYPE = "all";
}